<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
Function.prototype.apply = function(content,arg){
    if(typeof content === "string" || typeof content === "number" || typeof content === "boolean"){
        content = new Object(content);
    }else if(content === null || content === undefined){
        content = window;
    }
    const fnName = Math.random().toString(36).slice(2);
    Object.prototype[fnName] = this;
    // const result = content[fnName](...arg);
    const result = eval("content[fnName]("+arg.join(',')+")")
    // console.log("content[fnName]("+arg.join(',')+")")
    delete Object.prototype[fnName];
    return result;

}

function fn(a,b,c,d){
    console.log(this,a,b,c,d);
    return 100;
}
const result = fn.apply(1,[1,2,3,4]);
console.log(result);
</script>
</html>